<template>
  <el-dialog title="账户信息"
             :visible.sync="dialogForm"
             width="1100px"
             append-to-body>
    <base-list ref="baseList"
               :condition="condition"
               :datas.sync="accountInfoData"
               :pageSearch="pageSearch">
      <el-table slot="list"
                :data="accountInfoData"
                border
                stripe
                max-height="500">
        <el-table-column label="序号"
                         type="index"
                         width="50"></el-table-column>
        <el-table-column prop="mnemonicCode"
                         label="助记码"
                         min-width="120"></el-table-column>
        <el-table-column prop="name"
                         label="账户全称"
                         min-width="150"></el-table-column>
        <el-table-column prop="orgName"
                         label="所属客户单位"
                         min-width="200"></el-table-column>
        <el-table-column prop="disableSettle"
                         label="是否禁止结费"
                         min-width="130">
          <template slot-scope="scope">
            {{ scope.row.disableSettle | _filterTrueOrFalse }}
          </template></el-table-column>
        <el-table-column prop="accountTypeDesc"
                         label="账户类型"
                         min-width="120"></el-table-column>
        <el-table-column prop="accountNatureDesc"
                         label="账户性质"
                         min-width="150"></el-table-column>
        <el-table-column prop="pallets"
                         label="是否托盘客户"
                         min-width="120">
          <template slot-scope="scope">
            {{ scope.row.pallets | _filterTrueOrFalse }}
          </template></el-table-column>
        </el-table-column>
        <el-table-column prop="ifSteelMillUnit"
                         label="是否为钢厂"
                         min-width="120">
          <template slot-scope="scope">
            {{ scope.row.ifSteelMillUnit | _filterTrueOrFalse }}
          </template></el-table-column>
        </el-table-column>
        <el-table-column prop="overdueTypeDesc"
                         label="逾期类型"
                         min-width="150"></el-table-column>
        <el-table-column prop="overdueValue"
                         label="逾期值（天/元）"
                         min-width="150"></el-table-column>
        <!-- <el-table-column prop="overdueValue"
                         label="逾期值（元）"
                         min-width="120"></el-table-column> -->
        <el-table-column prop="transferFee"
                         label="是否收转库费"
                         min-width="130">
          <template slot-scope="scope">
            {{ scope.row.disableSettle | _filterTrueOrFalse }}
          </template></el-table-column>
        </el-table-column>
        <el-table-column prop="statistics"
                         label="报表是否统计"
                         min-width="130">
          <template slot-scope="scope">
            {{ scope.row.statistics | _filterTrueOrFalse }}
          </template></el-table-column>
        </el-table-column>
        <el-table-column prop="attachments"
                         label="附件信息"
                         min-width="220">
          <template slot-scope="scope">
            <download v-model="scope.row.attachments"></download>
          </template>
        </el-table-column>
      </el-table>
    </base-list>

    <div slot="footer"
         class="dialog-footer">
      <el-button @click="dialogForm = false">返 回</el-button>
    </div>
  </el-dialog>
</template>

<script>
import { getAccountList } from '@/api/commerce/account'
import download from '@/components/download'

export default {
  name: 'accountInfoForm',
  components: { download },
  data() {
    return {
      condition: {}, // 查询条件
      accountInfoData: [], // table数组
      pageSearch: getAccountList, // 分页查询api接口
      dialogForm: false
    }
  },
  updated() {
    this.loadData()
  },
  methods: {
    loadData() {
      this.$refs.baseList.loadData()
    }
  }
}
</script>

<style scoped>
</style>
